package com.architect.mvp.android.mvp;

import com.architect.mvp.android.http.HttpTask;
import com.architect.mvp.android.http.HttpUtils;

/**
 * 作者: Dream on 2017/2/26 23:19
 * QQ:510278658
 * E-mail:510278658@qq.com
 */

public class LoginModel {

    public void login(String name, String password,final HttpUtils.OnHttpResultListener onHttpResultListener){
        //调用具体的模块
        HttpTask httpTask = new HttpTask(new HttpUtils.OnHttpResultListener() {
            @Override
            public void onResult(String result) {
                //中介忽略100行代码
                onHttpResultListener.onResult(result);
            }
        });

        //执行请求
        httpTask.execute("http://192.168.2.1:8080/Dream_6_19_LoginServer/LoginServlet",name,password);
    }

}
